-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chip,dv] flash_ctrl memory protection test #20800
Conversation
fe32f4f
to
2bfcf2a
Compare
* FLASH_CTRL memory protection test | ||
* | ||
* This test checks multiple memory protection regions and priority in case | ||
* any regions are overrapped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* any regions are overrapped. | |
* any regions overlap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
&flash, /*rd_en=*/true, /*prog_en=*/true, /*erase_en=*/true, | ||
/*scramble_en=*/false, /*ecc_en=*/false, /*high_endurance_en=*/false)); | ||
|
||
for (int i = 2; i >= 0; i--) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious: should the test have two loops here, one that sets all region properties, and another one that does test_mem_access? This way test_mem_access will be certain to run with properties set as described above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each loop it programs table entry)
to cover multiple MP regions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I understand: each time you create a new region overlapping previous regions starting at a lower page, so it has higher priority. If you agree this is how it works, please change the text around line 34 to reflect this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matutem , test program higher region first, which has "lower" priority.
Then subsequent programming with lower region will overruled previous config parameter because
lower region number has "higher" priority.
2bfcf2a
to
ecf5e43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test LGTM, though I would wait for another more-familiar reviewer to approve as well.
One question. Is it worth covering bank 0 as well in this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jaedon, I added a comment with my understanding of the logic of the test. If it is accurate it can be used to enhance the comments near line 34 of the .c file, since the test is not obvious otherwise.
I'll leave it up to you to decide what to do.
LGTM
Test for multi mp region and their priority. Test verified in simulation platform. sival target will be added in the subsequent PR. Signed-off-by: Jaedon Kim <[email protected]>
ecf5e43
to
fb05a7a
Compare
Thanks, @matutem Comment has been updated as suggested. |
Test for flash_ctrl multi mp regions and their priority.
Test verified in simulation platform.
sival target will be added in the subsequent PR.